import os, logging
import webapp2

from google.appengine.ext.webapp      import template

from app_settings 	import *

ROOT_PATH = os.path.dirname(__file__)
TEMPLATE = os.path.join(ROOT_PATH, 'templates')

class MainPage(webapp2.RequestHandler):
    def get(self):
        path = os.path.join(TEMPLATE, 'index.html')
        form = """
        	<form action="/post" method="post">
        	</form>
        """
        template_values = { 'form': form}
        self.response.out.write(template.render(path, template_values))

class AddData(webapp2.RequestHandler):
    def get(self):
        self.response.out.write("""
          <html>
            <body>
              <form action="/add_data" method="post">
                <div><textarea name="personas" rows="3" cols="60"></textarea></div>
                <div><input type="submit" value="Sign Guestbook"></div>
              </form>
            </body>
          </html>""")

    def post(self):
    	return

app = webapp2.WSGIApplication([('/', MainPage),
								('/add_data', AddData)], debug=True)